Rate limit of Api

Hi, Team,
I’m iterating to all the schedules through rest api using python request
schedule_layer_id = “”
devops_schedule = False
for x in session.iter_all(“schedules”):
#print(“schedule name is -----”, schedule_name)
if x[“name”] == schedule_name:
devops_schedule = True
schedule_id = x[“id”]
break
But I’m getting
UserWarning: Stopping iter_all on GET /schedules at limit+offset=10100 as this exceeds the maximum permitted by the API (10000). The set of results may be incomplete.
False

is there any way to resolve this or any filters can we use ?
looking at this did not get anything https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTU2-filtering

it will be great help if you can help me resloving this
@devops

Hello @asha.bulani!

You are hitting a limit on the pagination of our APIs as described in our documentation.

As instructed you can use filters to restrict the scope but it will only be helpful depending on your naming conventions since the filter is only applied on the name field. Example:

Filter: “database”
Result: “database - 9 to 5”, “database - off-hours”, “backups database”, …

The query will return any schedule which name contains the word specified in the filter.

I hope this helps.